package cn.iocoder.yudao.module.pay.enums.refund;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 支付退款状态枚举
 *
 * @author huangweidong
 * @date 2023/05/09
 */
@Getter
@AllArgsConstructor
public enum PayRefundStatusEnum {

    /** 退款订单生成 */
    CREATE(0, "退款订单生成"),
    /** 退款成功 */
    SUCCESS(1, "退款成功"),
    /** 退款失败 */
    FAILURE(2, "退款失败"),
    /** 退款关闭 */
    CLOSE(99, "退款关闭");

    private final Integer status;
    private final String name;

    public static boolean isSuccess(Integer status) {
        return Objects.equals(status, SUCCESS.getStatus());
    }

}
